<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"  xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j">
	<c:choose>
		<c:when test="#{cart.products.isEmpty() || checkOut.currentFullName == null || checkOut.currentFullAddress == null || checkOut.currentFullCreditCard == null}">
				<div id="navi">
				<span>
					<h:graphicImage value="/resources/image/homeicon.jpg" alt="image" width="15" height="15"/>
					<h:outputLink value="index.xhtml" class="navi_button">Back to Entry</h:outputLink>
				</span>
				|
				<span>
					<h:graphicImage value="/resources/image/searchicon.jpg" alt="image" width="15" height="15"/>
					<h:outputLink value="customerSearchOrder.xhtml" class="navi_button">Search Purchases</h:outputLink>
				</span>
				|
				<span>
					<h:outputLink value="browse.xhtml" class="navi_link">Browse</h:outputLink>
				</span>

			</div>
			Illegal Request
		</c:when>
		<c:otherwise>
			<div id="container">
				<h:form>
					<div id="navi">
						<span>
							<h:graphicImage value="/resources/image/searchicon.jpg" alt="image" width="15" height="15"/>
							<h:outputLink value="index.xhtml" class="navi_button">Back to Entry</h:outputLink>
						</span>
						|
						<span>
							<h:graphicImage value="/resources/image/searchicon.jpg" alt="image" width="15" height="15"/>
							<h:outputLink value="customerSearchOrder.xhtml" class="navi_button">Search Purchases</h:outputLink>
						</span>
						|
						<span>
							<h:outputLink value="browse.xhtml" class="navi_link">Browse</h:outputLink>
						</span>
						>
						<span>
							<h:outputLink value="cart.xhtml" class="navi_link">Shopping Cart</h:outputLink>
						</span>
						>
						<span class="navi_current">
							<h:outputLink value="checkout.xhtml" class="navi_link">Check Out</h:outputLink>
						</span>
						>
						<span class="navi_current">Confirm</span>
						>
						<span class="navi_current">
							<h:outputLink value="finish.xhtml" class="navi_link">Finish</h:outputLink>
						</span>
					</div>
					<div id="confirm_decoration">
						
					</div>
					<div id="confirm_content">
						<div class="content_head">
							<span>Confirm Purchase</span>
						</div>
						<div class="content_body">
							<div class="info_cart">
							<p>
								<h:outputText value="Name: #{checkOut.currentFullName}" />
							</p>
							<p>
								<h:outputText value="Email: #{checkOut.currentEmail}" />
							</p>
							<p>
								<h:outputText value="Address: #{checkOut.currentFullAddress}" />
							</p>
							<p>
								<h:outputText value="Credit Card: #{checkOut.currentFullCreditCard}" />
							</p>
							</div>
						</div>
					</div>
					<div class="footnav">
						<span><h:commandButton class="footnav_button" onclick="location.href='checkout.xhtml'" value="&lt;&lt; Back" type="button" /></span>
						<span><h:commandButton class="footnav_button" action="#{checkOut.create(cart.products)}" value="Next &gt;&gt;" /></span>
					</div>
					<rich:notifyMessages stayTime="5000" nonblocking="true" />
				</h:form>
			</div>
		</c:otherwise>
	</c:choose>
	<!--
	<div id="body">
		
		<div id="content">
       <h:panelGrid columns="2">
            <h:outputText value="Name:" />
            <h:outputText value="MR Jim Green" />
        </h:panelGrid>
		<h:panelGrid columns="2">
            <h:outputText value="Email:" />
            <h:outputText value="Jim@uts.com" />
        </h:panelGrid>
		<h:panelGrid columns="2">
            <h:outputText value="Address:" />
            <h:outputText value="12 Broadway SurryHill NSW 2012 Australia" />
        </h:panelGrid>
		<h:panelGrid columns="2">
            <h:outputText value="Payment Detail" />
            <h:outputText value="" />
			<h:outputText value="Card Number:" />
            <h:outputText value="911911911" />
			<h:outputText value="Expire Month:" />
            <h:outputText value="Sep" />
			<h:outputText value="Expire Year:" />
            <h:outputText value="2017" />
			<h:outputText value="Security Code:" />
            <h:outputText value="911" />
        </h:panelGrid>
		
	<h:form>
			<h:commandButton value="Confirm" action="#{Customer.goToProgress(5)}" />
		</h:form>	
	</div>
	</div>-->
</ui:composition>

